Wrap Shading

نویسندگان

  • Peter-Pike J. Sloan
  • Derek Nowrouzezahrai
  • Hong Yuan
چکیده

Shading models that wrap around the hemisphere have been used to approximate subsurface scattering, area light sources, and softer reflectance profiles. We generalize a specific technique that has been used in games by parameterizing the amount of wraping while retaining important mathematical properties. We include details on how to incorporate theses models with spherical harmonic lighting. 1. Wrap Shading with Point and Directional Lights While standard Lambertian shading is used quite often, a more flexible technique is the “wrap” shading model, where light is allowed to wrap around the edge of the horizon instead of sharply cutting off when the cosine between the surface normal and the light is zero. An example of this in Figure 1, where the subject is partially backlit and the effect of increasing the amount of wrap becomes clear. This model is also used as a cheap approximation to subsurface scattering [Green 04] or as a more expressive base shading model [Mitchell et al. 06]. One wrap shading formulation is f(θ, w) = (cos(θ) + w)/(1 + w) , (1) © A K Peters, Ltd. 1 1086-7651/06 $0.50 per page i i “jgt ̇wrap” — 2011/11/30 — 10:04 — page 2 — #2 i i i i i i 2 journal of graphics tools Figure 1. Left to right: no wrap shading, wrap shading with a = 0.5, and a = 1.0. Note how wrap shading softens the appearance. where w is a parameter between [0, 1] that represents how far light is allowed to wrap around the sphere, cos(θ) is the dot product of the normal and light vector, and the value is clamped to zero. When w = 0 this is just conventional diffuse shading. The formulation used by Valve [Mitchell et al. 06] always wraps completely around the sphere, but the fall off takes on a different shape: f(θ) = 0.25 (cos(θ) + 1) . (2) One property of the above formulation is that when cos(θ) = 1 it matches the first two derivatives of the cosine function, while the formulation in Equation 1 only matches one derivative. This property is beneficial since it ensures f more closely matches a normal diffuse surface for a larger set of angles θ, as can be seen in Figure 3. This also retains the important diffuse highlight as θ, the angle between the light and the surface normal, approaches 0. Figure 2. Wrap shading with a fairly bright light directly behind the sphere. The GPUGems approach (left) and the more subtle model used by Valve (right). We generalize Mitchell’s model [Mitchell et al. 06] while retaining its important derivative property. Our new parameterized model is f(θ, a) = { ((cos θ + a)/(1 + a)) , if θ ≤ θm 0 , otherwise (3) i i “jgt ̇wrap” — 2011/11/30 — 10:04 — page 3 — #3 i i i i i i Sloan et al.: Wrap Shading 3 -3 -2 -1 1 2 3 0.2 0.4 0.6 0.8 1.0 cos θ 0.25(cos +1) θ 2 (cos +w)/(1+w) θ !"#$ Figure 3. Comparing different shading models: the blue curve is cos(θ), purple is Equation 2, tan is Equation 1 with w = 1. Our model better fits the important diffuse highlights present at small values of θ, all while maintaining the ability to smoothly wrap around the bottom hemisphere. where we clamp the domain of the function to the region where cos θ+ a ≥ 0, and so θm = arccos (−a) is the boundary of the kernel. Like Green [Green 04] this model is a clamped cosine at a = 0, reproduces Equation 2 at a = 1 and the derivative properties are maintained for a ∈ [0, 1]. In Figure 4 we see that when a = 1 the shading from the approach of [Green 04] is much flatter than our model’s shading; in this case, the light is in the upper right corner. Figure 4. Shading with Green’s model (top) and our model (bottom) for different values of w and a: (left to right) w and a = { 0, 1 4 , 1 2 , 3 4 , 1 }

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Axial Compressive Strength of Reinforced Concrete Columns Wrapped with Fiber Reinforced Polymers (FRP)

This paper presents the results of a study on the axial compressive strength of columnsstrengthened with FRP wrap. The experimental part of the study included testing 6 reinforcedconcrete columns in two series. The first series comprised three similar circular reinforced concretecolumns strengthened with FRP wrap. The second series consisted of three similar square columns,two with sharp corner...

متن کامل

Shading Impact on Qualitative Characteristics and Chlorophyll Content of Cut Rose (Rosa hybrida cv. Avalanche)

Light intensity is considered a limiting factor in greenhouse rose production. The main aim of this experiment was to evaluate the effect of shading treatments (0, 25, 50, and 65% shading) on quality and chlorophyll content of cut rose (Rosa hybrida cv. Avalanche), under greenhouse conditions. The experiment was planned in randomized completely block design with four replications. All shoots we...

متن کامل

Building Blocks and Excluded Sums

Figure 3. The four terms PPij, PSij, SPij, and SSij “wrap around” the excluded center cell i,j to cover the shaded region. Figure 2. The prefix algorithm. The prefix and suffix sums Pi ,Si are computed as cumulative sums starting from the left and from the right. The excluded sum is then Pi–1 + Si+1. If we peel away, layer by layer, the complexities of the fast multipole method, we find that it...

متن کامل

An Experimental Study of the Aerodynamic Behavior of the Two Wrap Around Fin Missiles

An extensive experimental investigation to understand the aerodynamic behavior of wrap around fin (WAF) missile configuration has been conducted. Various tests using at first a standard model (TTCP) in the trisonic wind tunnel of Imam Hossein University has been performed. The tunnel has attest section of 60×60 cm2 and can operate at Mach numbers of 0.4≤M∞≤2.2 and at attack angles of -4˚≤α≤10˚....

متن کامل

Effects of Pitching Motion on Shock Behavior in a Body-Wrap Around Fin Configuration

Unsteady dynamic behavior of TTCP model with different wrap around fin sets were investigated in a trisonic wind tunne. The aerodynamic coefficient force measurement in this wind tunnel shows good agreement in comparison with that of the NASA Langley Research Center in static case. The model was sinusoidally oscillated at three different frequencies of 1, 3 and 8 Hz at M=2.0 and the effects of ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. Graphics, GPU, & Game Tools

دوره 15  شماره 

صفحات  -

تاریخ انتشار 2011